<?php
/**
 * AbstractAction 继承于 Action 提供了一个中间层抽象控制器
 * - 输出预定义模板变量
 * - 后台登陆检查
 *
 * @author
 * @version
 */
abstract class AbstractAction extends Action
{
	//
	protected $_userid = NULL;

	protected $_username = NULL;

	protected $_setting = NULL;

	protected $_model = NULL;

	protected $_action = NULL;

	/**
	 * 抽象类初始化
	 */
	protected function _initialize()
	{
//		if (!$this->_checkLogin()) {
//			parent::redirect('Login/login');
//		} else {
//
//		}

		$this->_model = strtolower(MODULE_NAME);
		$this->_action = strtolower(ACTION_NAME);
        $this->assign('model', $this->_model);
        $this->assign('action', $this->_action);
	}

	/**
	 * 验证是否登录
	 *
	 * @return bool
	 */
	protected function _checkLogin()
	{
		return false;
	}
}